﻿#ifndef __SS_BYTES_QUE_H__
#define __SS_BYTES_QUE_H__
#include "../memory/uniPointer.h"
#include "../thread/threadLock/ssAtomicLock.h"
#include <deque>
#include <map>

namespace StarSeeker
{

typedef SS_SHARED_ARRAY<char> ssBytesPtr;

class ssBytesQue
{
public:
	ssBytesQue();
	~ssBytesQue();
	void Push(ssBytesPtr& data, unsigned int len);
	void Pop();
	void Clear();

	std::deque<std::pair<ssBytesPtr, unsigned int> >	m_queue;
	unsigned int	m_totalSize;
};

//class ssSessionQue
//{
//public:
//	ssSessionQue();
//	~ssSessionQue();
//	void Push(unsigned int id, ssBytesPtr& data, unsigned int len);
//	void SwitchOffset();
//	std::map<unsigned int, ssBytesQue>& CurrentMap();
//
//	std::map<unsigned int, ssBytesQue>	m_mapQue[2];
//	unsigned char						m_offset;
//	ssAtomicLock						m_lock;
//};

}
#endif
